import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl"

const TCHYURL = BASEURL.TCHYURL
const cargoOwnerApi = {
    // 货主管理-承运货主 列表
    getAcceptCarriageList(params) {
        let url = TCHYURL + '/account/cargo_owner/list'
        return myaxios.get(url, params)
    },
    getAcceptlistShipper(params) {
        let url = TCHYURL + '/order/platformOrder/listShipper'
        return myaxios.get(url, params)
    },

    getAcceptCarriageListdetail(params) {
        let url = TCHYURL + '/order/platformOrder/detailShipper'
        return myaxios.get(url, params)
    },
    // 承运订单回填
    getAcceptCarriageUpdatedetail(params) {
        let url = TCHYURL + '/order/platformOrder/echoShipper'
        return myaxios.get(url, params)
    },


    //货主详情
    // {ownerId：111116545}
    getOwnerDetails(params) {
        let url = TCHYURL + '/account/cargo_owner/getDetails'
        return myaxios.get(url, params)
    },
    // 货主详情-合同信息详情
    getcontractInfoDetails(params) {
        let url = TCHYURL + '/account/contract/cargo/detail'
        return myaxios.get(url, params)
    },
    // 货主详情-线路信息详情
    getLineInfoDetails(params) {
        let url = TCHYURL + '/account/userLine/cargoOwnerLineDetail'
        return myaxios.get(url, params)
    },
    // 新增货主 
    addCargoOwner(params) {
        let url = TCHYURL + '/account/cargo_owner/insert'
        return myaxios.post(url, params)
    },
    emitCargoOwner(params) {
        let url = TCHYURL + '/account/cargo_owner/update'
        return myaxios.put(url, params)
    },
    // 表单验证
    formValidate(params) {
        let url = TCHYURL + '/account/cargo_owner/check_again'
        return myaxios.get(url, params)
    },
    //单个删除
    deleteSingleCargoOwner(params) {
        let url = TCHYURL + '/account/cargo_owner/delete'
        return myaxios.Delete(url, params)
    },
    //批量删除
    deleteBatchCargoOwner(params) {
        let url = TCHYURL + '/account/cargo_owner/batchDelete'
        return myaxios.get(url, params)
    },
    //获取编辑回填 数据

    getOwnerUpdateDetails(params) {
        let url = TCHYURL + '/account/cargo_owner/getUpdateDetails'
        return myaxios.get(url, params)
    },
    //合同名称校验 合同编号校验
    checkContractNumber(params) {
        let url = TCHYURL + '/account/contract/checkContract'
        return myaxios.get(url, params)
    },










    // 运单列表
    waybillList(params) {
        let url = TCHYURL + '/order/waybill/waybillList'
        return myaxios.get(url, params)
    },

    //平台建单
    queryCreateOrder(params) {
        let url = TCHYURL + '/supplier/platform/queryCreateOrder'
        return myaxios.post(url, params)
    },
    //删除平台建单
    deleteCreateOrder(params) {
        let url = TCHYURL + '/supplier/platform/deleteCreateOrder'
        return myaxios.post(url, params)
    },
    //平台建单详情
    queryCreateOrderByCid(params) {
        let url = TCHYURL + '/supplier/platform/queryCreateOrderByCid'
        return myaxios.post(url, params)
    },
    //平台建单创建完成
    updateStateByCId(params) {
        let url = TCHYURL + '/supplier/platform/updateStateByCId'
        return myaxios.post(url, params)
    },
    //导入表格批量建单  
    batchCreateOrder(params) {
        let url = TCHYURL + '/order/platformOrder/batchCreateOrder'
        return myaxios.post(url, params)
    },
    //导出承运报表 
    getCarrierReport(params) {
        let url = TCHYURL + '/order/order/getCarrierReport'
        return myaxios.get(url, params)
    },

}
export default cargoOwnerApi;